<style type="text/css">
    body{
        background-color: #6C8697;
    }
</style>

<?php 
$producto_id = Yii::app()->getRequest()->getQuery('id');
$producto=Producto::model()->findByAttributes(array('producto_id'=>$producto_id));
$refs=Ref::model()->findAllByAttributes(array('producto_id'=>$producto->producto_id));
?>

<div>
<h3 class="title"> Colores y tallas: </h3>
</br>

<?php foreach ($refs as $ref): ?>
	<div class="colorytalla">
	        <?php $color=Color::model()->findByAttributes(array('color_id'=>$ref->color_id));  ?>
          <div class="color" style="background-color:<?php echo $color->html_color ?>"> 
		  </div>
    <?php $talla_ref=TallaRef::model()->findAllByAttributes(array('ref_id'=>$ref->ref_id)); ?>
        <?php foreach ($talla_ref as $tal_ref): ?>
            <?php $talla=Talla::model()->findByAttributes(array('talla_id'=>$tal_ref->talla_id)); ?>
            <?php echo $talla->nombre; ?>
           
        <?php endforeach; ?>

    
    </div>
<?php endforeach; ?>

</div>